#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFile>
#include <QTextStream>
#include "highlighter.h"
#include <fstream>
#include <sstream>
#include <iostream>
#include <QFileDialog>
#include <QString>
#include <QMessageBox>
#include "lexico.h"
#include "sintactico.h"
#include "generarcodigo.h"
#include <QCompleter>

using namespace std;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    bool maybeSave();
    bool save();
    bool saveAs();
    bool saveFile(QString fileName);
    void setCurrentFile(QString filename);
    void loadFile(QString FileName);
    void open();
    void newFile();
    
private slots:
    void on_actionOpen_triggered();

    void on_actionCompile_triggered();

    void on_actionSave_2_triggered();

    void on_actionSave_As_triggered();

    void on_actionNew_triggered();

    void on_actionSi_Fin_Si_triggered();

    void on_actionSi_Sino_Fin_Si_triggered();

    void on_actionCaso_Fin_Caso_triggered();

    void on_actionPara_Fin_Para_triggered();

    void on_actionMientras_Fin_Mientras_triggered();

    void on_actionRepita_Hasta_triggered();

private:
    QString ActualDir;
    Ui::MainWindow *ui;

};

#endif // MAINWINDOW_H
